package net.lovesrc.allin.jobs.base;

import java.util.Calendar;

public abstract class WorkTimeJob extends BaseJob {

    @Override
    public final void runOnce() throws Exception {
        int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
        if (hour >= 8 && hour <= 21) {
            doRunOnce();
        }
    }

    public abstract void doRunOnce();

}
